<template>
  <div>
    <ul>
      <li v-for="(i, item) in arr" :key="item" @mouseover="huaguo(item)">
        {{ i }}
      </li>
    </ul>
  </div>
</template>
<style scoped>
* {
  margin: 0;
  padding: 0;
}
li {
  position: relative;
}
ul,
li {
  list-style: none;
}
li {
  width: 300px;
  border: 1px solid #000;
  height: 20px;
}
b {
  position: absolute;
  right: 0;
  top: 0;
}
</style>
<script>
export default {
  data() {
    return {
      zhi: "",
      arr: [],
      chuxian: true,
      ii: "",
    };
  },
  methods: {
    luru() {
      if (this.mingzi.length > 0) {
        this.$emit("luru");
      }
    },
    danshan() {
      this.$emit("item");
    },
    xiugai(i) {
      i.gai = true;
    },
    xin(i) {
      i.name = this.zhi;
      i.gai = false;
      this.zhi = "";
    },
  },
  computed: {
    getArrcheck() {
      var n = 0; //为社么会自动减去
      this.arr.forEach((item) => {
        if (item.check == false) {
          n++;
        }
      });
      return n;
    },
    getArrnocheck() {
      var n = 0;
      this.arr.forEach((item) => {
        if (item.check == true) {
          n++;
        }
      });
      return n;
    },
  },
};
</script>
